#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@desc: .

@Project ：kuberCloudTest 
@File ：labels.py
@Author ：admin
@Date ：2024/3/21 11:08 
"""
from kuberCloudTest.common.basic import basicUtils
from kuberCloudTest.common.constant import OFFSET, LIMIT
from kuberCloudTest.urls import Urls


class _labelUtils(basicUtils):

    def __init__(self, accessToken):
        super().__init__(accessToken)


def getLabel(accessToken, **kwargs):
    """
    获取标签
    :param accessToken: access token
    :param kwargs: limit:
                   offset:
                   keyword: xxx
    :return:
    """
    label_utils = _labelUtils(accessToken=accessToken)
    return label_utils.cloud_http_request.get(Urls.getZone.value,
                                              {
                                                  'offset': kwargs.get('offset', OFFSET),
                                                  'limit': kwargs.get('limit', LIMIT),
                                                  'keyword': kwargs.get('keyword', ''),
                                                  'searchitem': kwargs.get('searchItem', 0),
                                                  'order': kwargs.get('order', 'asc')
                                              })
